package com.sky.mapper;
import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Description TODO
 * @Author itheima
 * @Date 2023-07-10 21:57
 */
@Mapper
public interface DishFlavorMapper {
    /**
     * 添加
     * @param flavors
     */

    void insertFlavor(List<DishFlavor> flavors);

    /**
     * 批量删除口味表关联
     * @param ids
     */
    void delete(List<Long> ids);

    /**
     * 根据id删除
     * @param id
     */
    @Delete("delete from dish_flavor  where dish_id=#{dishId}")
    void deleteid(Long id);
        @Select("select *from dish_flavor where dish_id=#{dishId}")
    List<DishFlavor> getByDishId(Long id);
}
